package cn.tedu._03vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;


@Data
public class UserRegParam {
    @NotNull(message = "用户名不可以为null哦~")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    @Pattern(regexp = "^(?:(?=.*[A-Za-z])(?=.*\\d)|(?=.*[A-Za-z])(?=.*[._])|(?=.*\\d)(?=.*[._]))[A-Za-z\\d._]{6,12}$",message = "密码长度在6到12位之间，包含数字、字母（大小写）和字符（仅包含.和_），并且至少包含两种类型")
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;

    @Size(min = 11, max = 11, message = "11位的手机号格式不正确")
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
}
